package org.cable.account.job;

import lombok.extern.slf4j.Slf4j;
import org.cable.account.service.TrafficService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * @author hsj
 * @date 2024/1/8 15:52
 */
@Configuration
@EnableScheduling
@Slf4j
public class TrafficJobHandler {


	@Autowired
	private TrafficService trafficService;


	@Scheduled(cron = "0 15 10 ? * *")
	private void process(){
        log.info("===============定时任务:过期流量包处理开始===============");
		trafficService.deleteExpireTraffic();
		log.info("===============定时任务:过期流量包处理结束===============");
	}

}
